package y2017.date0216am.对象流;

import java.io.Serializable;

public class Teacher implements Serializable {


    /**
     * 自动生成一个UID
     */
    private static final long serialVersionUID = 1L;
    /**
     * id
     */
    private int id;
    /**
     * 名字
     */
    private String name;
    /**
     * 性别
     */
    private String sex;
    /**
     * 年龄
     */
    private int age;
    /**
     * 主要职务
     */
    private String mainJob;

    public Teacher() {
        // TODO Auto-generated constructor stub
    }

    public Teacher(int id, String name, String sex, int age,
                   String mainJob) {
        super();
        this.id = id;
        this.name = name;
        this.sex = sex;
        this.age = age;
        this.mainJob = mainJob;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getMainJob() {
        return mainJob;
    }

    public void setMainJob(String mainJob) {
        this.mainJob = mainJob;
    }

    @Override
    public String toString() {
        return "Teacher [id=" + id + ", name=" + name + ", sex=" + sex
                + ", age=" + age + ", mainJob=" + mainJob + "]";
    }
}
